home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: zach.fit.edu!rcs79272
- From: rcs79272@zach.fit.edu (Eric Schank /ADVISOR Engle )
- Subject: member of same class in definition
- Message-ID: <DMvvvt.6qH@zeno.fit.edu>
- Sender: news@zeno.fit.edu (USENET NEWS SYSTEM)
- Nntp-Posting-Host: zach.fit.edu
- Organization: Florida Institute of Technology
- Date: Fri, 16 Feb 1996 19:38:17 GMT
-
- I would appreciate someone explaining this code sample to me.
-
-
- class egg{
- static egg E;
- int i;
- public:
- egg(int I) : i(I) {}
- };
-
- egg egg::E(47);
-
-
- When and egg is instantiated and E is created, isn't another
- egg created inside of E, and so on...
- When does this end? Wouldn't you use up all your memory
- recursively definig members of the same class?
-
- Any insight is welcome.
-
- Please reply to my email address, as I don't often read
- this news group.
-
- Thanks.
-
- Eric Schank
- rcs79272@zach.fit.edu
-
-